import { useLocale } from "@/locales"

import { DeleteRgba, DisableRgba, LockingRgba, NormalRgba } from "../lockStatus/styled"

const AccountStatus = ({ row }: { row: any }) => {
	const { paymentLockStatus, loginLockStatus, gameLockStatus } = row

	const { newFormat } = useLocale()

	return (
		<div>
			{!!paymentLockStatus && (
				<DeleteRgba>
					{newFormat("common.account_lock_status")}
					<br />
				</DeleteRgba>
			)}
			{!!loginLockStatus && (
				<DisableRgba>
					{newFormat("common.login_lock_status")}
					<br />
				</DisableRgba>
			)}
			{!!gameLockStatus && <LockingRgba>{newFormat("common.game_lock_status")}</LockingRgba>}
			{paymentLockStatus === 0 && loginLockStatus === 0 && gameLockStatus === 0 && (
				<NormalRgba>{newFormat("common.account_status_normal")}</NormalRgba>
			)}
		</div>
	)
}

export default AccountStatus
